<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN"><HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=ISO-8859-1">
<META HTTP-EQUIV="Content-Style-Type" CONTENT="text/css">

<LINK REL="STYLESHEET" HREF="../book.css" CHARSET="ISO-8859-1" TYPE="text/css">
<title>Using the New button</title>

</HEAD>
<BODY BGCOLOR="#ffffff">
<h3>
Using the New button</h3>
<P CLASS="Para">We have seen how to create resources using File &gt; New and New
from the Navigator's context menu. We will now create a file for our project using
the third alternative, the New button.</P>
<TABLE BORDER="0" cellspacing="0" cellpadding="3">
<THEAD>
</THEAD>
<TBODY>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
1.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
Select the folder JanesFolder in the Navigator view.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
2.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">In the Workbench window's toolbar, activate the drop-down menu on the New Wizard button <img align="texttop" border="0" src="../images/Image15_new_button.jpg"  width="36" height="20">
 and select File. To activate the drop-down menu simply click on the down arrow.</P>
<P CLASS="Para">
<img align="texttop" border="0" src="../images/Image16_new_pulldown.jpg" width="153" height="143"></P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
3.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the New File wizard, your folder's name and path already&nbsp; appear by default in the
<i> Enter or select the folder </i> field. This is because you chose to create the new file while this folder was selected in the Navigator
view and the view was active.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
4.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the <i> File name </i> field, type a unique name for a new text file, including the .txt file extension. Do not use spaces or special characters in this file name (e.g., &quot;JanesFile.txt&quot;).</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
5.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
Click Finish when you are done.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
6.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">The workbench has an editor capable of editing text files. A text
editor is automatically opened on the newly created file.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
7.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the text editor, type in the following five lines:</P>
<blockquote>
  <P CLASS="Para"><i>This is a sample text file.<br>
  There is not much else<br>
  we can really say about it other<br>
  than it has five lines of<br>
  text that are rather dull.</i></P>
</blockquote>
<P CLASS="Para">Notice that the editor tab has an asterisk (*) at the left of
the filename. The asterisk indicates that the editor has unsaved changes.</P>
<blockquote>
  <P CLASS="Para"><img align="texttop" border="0" src="../images/Image17b_unsaved_changes.jpg" width="232" height="116"></P>
</blockquote>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
8.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the Workbench window's toolbar, click the Save button <img align="texttop" border="0" src="../images/Image17_save_button.jpg"  width="21" height="20"> to save&nbsp;
your work.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
9.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the Navigator view ensure your folder is still selected and the Navigator
view is active.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
10.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
Click the New Wizard button in the workbench toolbar. Previously we clicked on
the drop-down arrow of the New button. Here we clicked on the button itself
which has the same effect as choosing File &gt; New &gt; Other...&nbsp;</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
11.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the New wizard, click Simple in the left pane, and in the right pane, click File. Then click Next.&nbsp;</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<b>12.</b>
</TD>
<TD valign="top" align="left">
 Once again, your folder's name and path appears by default in the <i> Enter or select the folder
</i> field.&nbsp;
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
13.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
In the <i> File name </i> field, type a unique name for an .ini file. Do not use any spaces or special characters in the file name (e.g., &quot;JanesINIFile.ini&quot;). Click Finish when you are done.</P>
</TD>
</TR>
<TR>
<TD valign="top" align="left">
<P CLASS="Para">
<b>
14.</b>
</P>
</TD>
<TD valign="top" align="left">
<P CLASS="Para">
Since the workbench does not have any editors registered for .ini files, it
launches an external editor on the file. For the moment, close this external
editor. </P>
</TD>
</TR>
</TBODY>
</TABLE>
<P>Now that we have created our resources, the Navigator view shows our two
projects, the folder and its two files. To the right of the Navigator view is the
text editor open on the first file we created (JanesFile.txt). If you look
closely you can also see a second, inactive editor tab, &quot;Welcome&quot;.&nbsp;
</P>


<P><img align="texttop" border="0" src="../images/Image18_created_resources.jpg" width="642" height="493">
</P>


<P>Click on the Welcome editor tab. Now select the file JanesINIFile.ini in the Navigator view. Lastly,
click on the editor tab for JanesFile.txt. Notice how the Navigator updated
itself to select the file you are currently editing (JanesFile.txt). If you
don't like this automatic update you can easily turn it off using Window &gt;
Preferences &gt; Workbench.
</P>


<P><br>
<img align="texttop" src = ../ngibmcpy.gif width="195" height="12">
</P>


</BODY>
</HTML>
